package service;

import java.util.List;

import model.User;
import dao.UserDaoImpl;

public class UserServiceImpl implements UserService {
	 private UserDaoImpl userdaoimpl=new UserDaoImpl();
      public boolean CreateUser(User user)throws Exception{
    	 return  userdaoimpl.doCreate(user);
      }
	@Override
	public User finduserByID(int userid) throws Exception {
		return userdaoimpl.findById(userid);
	}
	@Override
	public List<User> findAll() throws Exception {
		// TODO Auto-generated method stub
		return userdaoimpl.findAll();
	}
	@Override
	public boolean deleteUser(String userid) throws Exception {
		// TODO Auto-generated method stub
		return userdaoimpl.dodelete(userid);
	}
	@Override
	public boolean updateUser(User user) throws Exception {
		// TODO Auto-generated method stub
		return userdaoimpl.doupdate(user);
	}

	
      
      
      
      
}
